package cn.tedu.reflect;

import java.lang.reflect.Method;

public class Test3 {
    public static void main(String[] args) throws Exception {
        Class<?> clazz = Class.forName("cn.tedu.reflect.SomeService");
        Method doSomeMethod = clazz.getDeclaredMethod("doSome", String.class);

        Object obj = clazz.newInstance();
        Object reValue = doSomeMethod.invoke(obj, "王五");
        System.out.println(reValue);

    }
}
